package com.onluy.frameworkcloud.data.entity;


import com.alibaba.fastjson.serializer.SerializerFeature;
import java.util.LinkedHashMap;
import java.util.Map;

public abstract class AbstractEntity implements Entity {
    protected static final SerializerFeature[] serializerFeatures;
    private Map<String, OperColumn> operColumns;

    protected OperColumn addOperColumn(String column, String property, Object value, Class<?> type) {
        if (this.operColumns == null) {
            this.operColumns = new LinkedHashMap();
        }

        OperColumn operColumn = (OperColumn) this.operColumns.get(column);
        if (operColumn == null) {
            operColumn = new OperColumn(column, property, value, type);
            this.operColumns.put(column, operColumn);
        } else {
            operColumn.setOperColumnValue(value);
        }

        return operColumn;
    }

    Map<String, OperColumn> operColumns() {
        return this.operColumns;
    }

    static {
        serializerFeatures = new SerializerFeature[]{SerializerFeature.WriteDateUseDateFormat};
    }
}